<?php

namespace App\Models;

use App\Traits\WorkerMysqlConnect;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class u_xianhong extends Model
{
    use HasFactory;
    use WorkerMysqlConnect;

    protected $table = 'u_xianhong';

    public static function getAllXianhong($select = '*',$status = 1)
    {
        return self::connectWorker()->select($select)->where(compact('status'))->query();
    }

    public static function getXianhongIdByShowhao($showhao = '21',$select = '*')
    {
        return self::query()->select(explode(',',$select))->where(compact('showhao'))->first();
    }
}
